package ch.uzh.ifi.seal.ssqa.ui.providers;

import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.zest.core.viewers.IGraphEntityContentProvider;

import ch.uzh.ifi.seal.ssqa.model.DiagramComposite;

public class ChangeCouplingContentProvider extends ArrayContentProvider implements IGraphEntityContentProvider {

	@Override
	public Object[] getConnectedTo(Object entity) {
		if(entity instanceof DiagramComposite){
			return ((DiagramComposite)entity).getChildren().toArray();
		} 
		throw new RuntimeException("Type " + entity.getClass()+" not supported");
	}
}
